package ru.uskov.trainer.datastore;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class SomeStoredClass {
  @PrimaryKey
  @Persistent(valueStrategy = IdGeneratorStrategy.UUIDSTRING)
  private String id;

  @Persistent
  private String author;

  @Persistent
  private String content;

  @Persistent
  private Date date;
  
  public SomeStoredClass(String author, String content, Date date) {
    this.author = author;
    this.content = content;
    this.date = date;
}

public String getId() {
    return id;
}

public String getAuthor() {
    return author;
}

public String getContent() {
    return content;
}

public Date getDate() {
    return date;
}

public void setAuthor(String author) {
    this.author = author;
}

public void setContent(String content) {
    this.content = content;
}

public void setDate(Date date) {
    this.date = date;
}
@Override
public String toString() {
  return "SSC: " + date.toString();
}
}
